package com.mark.web.data.controller.portal;

import com.mark.common.ServerResponse;
import com.mark.web.data.service.IHeadLineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Description: 头条信息的前端调用：获取三条头条信息用于轮播图展示
 * @Author: Mark
 * @CreateDate: 2018/8/14.
 * @Version: 2.0
 * @Copyright : 豆浆油条个人非正式工作室
 */
@RestController
@RequestMapping("/headLine/")
public class HeadLineController {

    @Autowired
    private IHeadLineService iHeadLineService;

    //1.获取公告信息列表。调用时不用传参使用默认值即可
    @GetMapping(value = "list.do")
    @ResponseBody
    public ServerResponse getUserList(@RequestParam(value = "pageNum",defaultValue = "1") int pageNum,
                                      @RequestParam(value = "pageSize",defaultValue = "3") int pageSize){
        return iHeadLineService.portalGetHeadLineList(pageNum,pageSize);
    }
}
